package cn.cy.structure.adapter.obj.pattern;

/**
 * @author yangxq
 * @desc
 * @date 2025-05-11
 */
public class PowerAdapter implements NewPower {

    private OldPower oldPower;

    public PowerAdapter(OldPower oldPower) {
        this.oldPower = oldPower;
    }

    @Override
    public void providePower() {
        oldPower.outputPower(); // 转发请求
        System.out.println("适配时新增的逻辑...");
    }

}
